home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / drlock.arc / DRLOCK.DOC next >
Text File  |  1988-06-22  |  14KB  |  349 lines

  1.                                DRLOCK
  2.  
  3. version 0.1 (c) copy right 1988 All Rights Reserved
  4.  
  5.      This is a simple security program to turn on/off diskette access to 
  6. drive A: or B:, as well as to the hard disk of AT, XT 286 and PS/2.  You can 
  7. independently allow read, write or format to each and change it as needed 
  8. from a pop up menu.  The pop up menu itself can be protected by a password 
  9. security code and the number of tries you are allowed to try the pass can be 
  10. set at various values as well.  This program can be wiped from memory, along 
  11. with any other program ran after this to allow big programs as much space as 
  12. possible.  OR, this program can be locked to prevent you from removing this 
  13. program.  Whether you wipe this out or if it's locked, the program will tell 
  14. you what time this program was originally ran.  When you first run this 
  15. program, this program will also tell you the time this program first became 
  16. memory resident, so by comparing the two, you can tell if someone has 
  17. tampered with your computer by turning the computer off, also.
  18.  
  19.      This program intercepts the disk BIOS interrupt 13h.  Any disk system 
  20. which does not use this will not be affected.  The PS/2 read and write uses 
  21. the interrupt 13h for disk read and write, but when formatting the hard disk, 
  22. the format.com uses interrupt 21h function 440dh major code 8, minor code 42h 
  23. for format and verify track on a logical device on the hard disk.  This is 
  24. intercepted and checked if the default drive or drive C:.  If either the 
  25. default or C: and the HD format is turned off, then format.com will abort 
  26. with the message
  27.  
  28. Attempted write-protected violation
  29. Format failure
  30. Format another (Y/N)?
  31.  
  32.      The presence of a PS/2 is checked with the system services interrupt 15h 
  33. (formerly the cassette interrupt) function 0c0h for 'return system 
  34. configuration parameters'.
  35.  
  36.      This program was tested on a PS/2 with a hard disk and an XT without a 
  37. hard disk running on the latest DOS 3.3 and was found to work without any 
  38. trouble.  If you are not sure that this program will work for your particular 
  39. machine, assume that only the read/write features can be turned on or off and 
  40. assume that the format cannot be turned off and try this out as an experiment.
  41.  
  42.      This program is designed to work on CGA, EGA, monochome or VGA in either 
  43. the 80 column wide mode or the 40 column wide mode.
  44.  
  45. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  46.  
  47.      If you simply type
  48.  
  49. DRLOCK
  50.  
  51. then you get the help screen only.
  52.  
  53. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  54.  
  55.      To run this, simply type
  56.  
  57. DRLOCK RUN
  58.  
  59. and end it with an <ENTER> or <ntr> or <cr> or anything else you want to call 
  60. the carriage return.  Just the letter 'r' in 'run' will work also.  The <alt> 
  61. and 'M' will pop up the menu.
  62.  
  63.      You can load any other program AFTER the DRLOCK to be removed along with 
  64. DRLOCK, provided that the other programs have my name mentioned somewhere or 
  65. it mentions that this program will wipe out that particular program also.  Do 
  66. not run any other memory resident program after DRLOCK if not made by this 
  67. group or specifically mentions that DRLOCK will wipe out that software also.
  68.  
  69.  
  70.      With the default above, there is no need to type a password to pop up 
  71. the pop up menu.  All drives will allow read/write/format.  The program can 
  72. be wiped from memory, and a chirping sound will be generated when you try to 
  73. access a drive whose feature (read/write/format) is turned off.
  74.  
  75. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  76.  
  77.      To lock this program so that it will not come out of memory, type
  78.  
  79. DRLOCK L
  80.  
  81.      If you have other commands entered at this command line, it is a good 
  82. practice to separate the commands with at least one space.  There is no need 
  83. to enter the Run command in this case.  If you enter the Run command, 
  84. everything afterwards is ignored.
  85.  
  86. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  87.  
  88.      To prevent the chirping sound (No-sound) when your program tries to use 
  89. a feature which is turned off, type
  90.  
  91. DRLOCK N
  92.  
  93.      In this case, you do not have to type the 'R' parameter to run this.
  94.  
  95. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  96.  
  97.      To wipe this program and any other program ran after this from memory,
  98.  
  99. DRLOCK W
  100.  
  101.      And DRLOCK will tell you what time it was ran.  If the time does not 
  102. match the time you noted as the first time you ran DRLOCK, then someone 
  103. turned off the computer and played around with it.
  104.  
  105. NOTE:  A version of MSPOOL which was originally uploaded to CompuServe cannot 
  106. remove this program.  A corrected version should be present at this time.
  107.  
  108. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  109.  
  110.      To disallow write/format to drive B: and disallow write to the hard 
  111. disk, type
  112.  
  113. DRLOCK BWF HW
  114.  
  115.      The letters BWF stands for 'drive B:  do not allow Write/Format.
  116.      The letters HW stands for 'Hard disk:  do not allow Write.
  117.  
  118.      You do not have to specify the 'R'un parameter since the presence of any 
  119. parameter other than 'W'ipe indicates that you want to run this program.
  120.  
  121.      Similarly, to disallow for drive A: or C:, follow the drive letter with 
  122. the letters RWF for Read, Write or Format.  The letters may be in capital or 
  123. small letters in any order but must NOT be separated from the drive letter 
  124. with any space or tab.  In other words, DRLOCK B R will not disallow Read 
  125. for drive B: when you first run DRLOCK because of the space separating 'B' 
  126. for drive B:.  And 'R' will be interpreted as the end of this command line 
  127. and taken as meaning 'R'un.
  128.  
  129.      The accesses allowed may be changed later using the pop up menu.
  130.  
  131. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  132.  
  133.      To prevent the pop up menu from popping up unless you know the password, 
  134. type
  135.  
  136. DRLOCK Ppassword
  137.  
  138.      All letters after the letter 'p' until a space, tab or the end of a line 
  139. will be taken as the password.  Although the letter 'P' to indicate the next 
  140. line to follow can be in capitals or small letters, the password itself must 
  141. match each capital or small letter you type at the pop up prompt.  So if your 
  142. password is 'Cathy', then using 'cathy' or 'cAthy' at the pop up prompt for a 
  143. pass will not work.  The password may be up to 78 characters long, including 
  144. any character from chr$(33) through chr$(255).
  145.  
  146.      If you literally type
  147.  
  148. drlock pcAThy
  149.  
  150. to run DRLOCK, then when the prompt to enter the password appears, you must 
  151. literally type the 'cAThy' as is to access the pop up menu to change the 
  152. accesses.
  153.  
  154. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  155.  
  156.      When a feature which is not allowed is detected, DRLOCK sets a carry 
  157. flag and returns an error condition in the AH register back to the operating 
  158. system or the program which tried to access a feature such as read/write/
  159. format which was not allowed at the time.  For read request, the default is 
  160. to set the time-out error to say that the disk drive failed to respond only.  
  161. For write and format, the default is the set the write protected error.  To 
  162. change the read error status returned in the AH register to 'bad command 
  163. passed to diskette i/o', type
  164.  
  165. DRLOCK !1
  166.  
  167.      To change the write error status to 'time-out', type
  168.  
  169. DRLOCK @128
  170.  
  171.      To change the format error status to 'time-out' and 'bad-command', type
  172.  
  173. DRLOCK #129
  174.  
  175.      The values which can be combined with each are the following:
  176.  
  177. time-out          128          disk drive did not respond at all
  178. bad-seek           64          disk head did not seek to requested area
  179. bad-nec            32          the NEC disk controller failed
  180. bad-crc            16          cyclic redundancy check error
  181. dma-boundary        9          tried to access over 64kb of space
  182. dma-bad             8          direct-memory-access overrun
  183. no-such-record      4          sector requested did not exist
  184. write-protected     3          disk is write protected
  185. bad-adr-marker      2          no address marker found
  186. bad-command         1          incorrect command was sent to disk drive
  187.  
  188. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  189.  
  190.      If a password is required, then you are given a default of three times 
  191. to type the proper password.  To change the number of tries allowed to 2, 
  192. type 
  193.  
  194. DRLOCK T2
  195.  
  196.      The default is to allow three tries.
  197.  
  198. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  199.  
  200.  
  201.  
  202.  
  203.                          PROMPTS AND MESSAGES
  204. =-=-=
  205. DRLOCK:  Enter password or <esc>
  206. =-=-=
  207.  
  208.      When the pop up menu is protected, this message will appear to ask you 
  209. to enter the password.  End the password with a carriage return or type the 
  210. escape key to get out any time.
  211.  
  212. |--------------------------------------|
  213. |A: read write format   cursor         |
  214. |B: read write format   and <ENTER> to |
  215. |C: read write format   change setting |
  216. |HD read write format   <ESC> exits    |
  217. |v-0.1-DrMS&ASSOC----------------------|
  218.  
  219.      This is roughly what the pop up will look like when you turn it on.  
  220. Move the cursor up/down/left/right to the desired feature and then press on 
  221. the carriage return.  If the cursor is on the first 'read' when you do, then 
  222. the word 'read' will disappear from the drive A: row and you will be left 
  223. with
  224.  
  225. |--------------------------------------|
  226. |A:      write format   cursor         |
  227. |B: read write format   and <ENTER> to |
  228. |C: read write format   change setting |
  229. |HD read write format   <ESC> exits    |
  230. |v-0.1-DrMS&ASSOC----------------------|
  231.  
  232.      Now, any attempt to read the diskette in drive A: will be intercepted 
  233. and a chirping sound will be made to tell you that nothing actually happened.
  234. This program will not intercept a RAM drive configured as drive C: if it does 
  235. not use the standard BIOS to access the diskette drive.
  236.  
  237.      Similarly, moving the cursor to the HD (hard disk) line and pressing 
  238. down on the carriage return once at the 'read' feature will disallow reading 
  239. the hard disk.  Press down on the carriage return once more to allow reading 
  240. the hard disk.
  241.  
  242. =-=-=
  243. Sorry, I cannot remove DRLOCK because it is not in memory
  244. =-=-=
  245.  
  246.      If you tried to wipe DRLOCK from memory when you did not have one in 
  247. memory, then you get this message.
  248.  
  249. =-=-=
  250. You don't have to do it, DRLOCK is already in memory
  251. =-=-=
  252.  
  253.      If you tried to run DRLOCK when DRLOCK was already in memory, then you 
  254. get this message.
  255.  
  256. =-=-=
  257. Internal memory organization is destroyed !!!
  258. I recommend that you warm reBOOT WITH THE CTL-ALT-DEL key combination
  259. as soon as possible since the behavior of the machine is no longer
  260. predictable.  Do not ignore this error message!
  261. =-=-=
  262.  
  263.      You will get this long message if you tried to wipe DRLOCK from memory 
  264. and something unexpected happened.  This can happen often if you were running 
  265. BASIC to poke values into memory without checking to see if you are allowed 
  266. to do so by consulting with DOS.  DRLOCK itself consults with DOS and should 
  267. not by itself cause this error.
  268.  
  269. =-=-=
  270. DRLOCK was run at ........... 
  271. If the "run time" displayed at wipe out time does not match this,
  272. then someone has turned off the machine and tampered with it.
  273. Note the time on a piece of paper and carry it with you.
  274. =-=-=
  275.  
  276.      This message appears when you first make DRLOCK memory resident.  Note 
  277. the time somewhere and check the time against the time displayed when you 
  278. wipe or at least try to wipe DRLOCK from memory.  If the two times do not 
  279. match exactly, then it implies that someone turned off your machine and did 
  280. something with it.
  281.  
  282.      The time is given in the 24 hour format such that 23:12:45.00 is 45 
  283. seconds past 11:12 PM with the '.00' representing the 1/100 th of a second.
  284. Some clones may consistently give '.00' for the 1/100 th of a second.
  285.  
  286. =-=-=
  287. This was turned on at ...........
  288. This is locked and cannot be wiped from memory
  289. =-=-=
  290.  
  291.      If you try to wipe DRLOCK from memory but DRLOCK was locked with the 'L' 
  292. parameter, you get this message.  This can be defeated by turning off the 
  293. machine and running the program over again, but anyone who does will have to 
  294. change the time, match it exactly and go through a few other time consuming 
  295. steps to try to fool you.  If you had a password to pop up the menu, and it 
  296. no longer pops up, then you know that someone was playing with your machine.
  297.  
  298. =-=-=
  299. Run time was ...........
  300. Wipe time was ...........
  301. =-=-=
  302.  
  303.      If DRLOCK was not locked and can come out of memory, then you get this 
  304. message.
  305.  
  306.  
  307.  
  308. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  309.  
  310.  
  311.  
  312. All products and names mentioned are Trademarks or Registered Trademarks of 
  313. their respective corporations or companies.
  314.  
  315. All enclosed programs, documents and other files are provided AS IS, without 
  316. any warranty, expressed or implied, including but not limited to fitness for 
  317. a particular purpose.
  318.  
  319. A contribution of $10 US/Canadian is appreciated if you find this useful, or 
  320. $20 for an improved one which wipes out any and all programs (not just mine 
  321. or associate(s)) loaded after this, among other features.  (This later uses 
  322. more memory, of course)
  323. Your negative criticisms are also welcome.
  324.  
  325. P.S.  The program keeps track of when the first 100 attempts to access the 
  326. password happened at, but this version does not display the times.
  327.  
  328.  
  329.  
  330. Dr. Masaaki Sawada & Assoc.
  331. University of Waterloo, Faculty of Science
  332. Waterloo, Ontario  Canada  N2L 3G1
  333.  
  334.  
  335. No school time nor equipments were used in producing this program and 
  336. documentation.
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.